<?php
load_theme_textdomain( 'sofa_suppastore' );

/************************************* THEME OPTIONS *************************************/
class SofaSuppaStore {

	function addOptions() {

		if( isset( $_POST[ 'suppastore_reset' ] ) ) { SofaSuppaStore::initOptions( true ); }

		if( isset( $_POST[ 'suppastore_save' ] ) ) {

			$aOptions = SofaSuppaStore::initOptions( false );
			// product
			$aOptions[ 'num_of_def_boxes' ] = intval( $_POST[ 'num_of_def_boxes' ] );
			$aOptions[ 'prod_use_description' ] = $_POST[ 'prod_use_description' ];
			$aOptions[ 'prod_description_trim' ] = intval( $_POST[ 'prod_description_trim' ] );
			$aOptions[ 'prod_use_related' ] = $_POST[ 'prod_use_related' ];
			$aOptions[ 'prod_disable_comments' ] = $_POST[ 'prod_disable_comments' ];
			
			// general
			$aOptions[ 'paypal_mode' ] = $_POST[ 'paypal_mode' ];
			$aOptions[ 'ppal' ] = $_POST[ 'ppal' ];
			$aOptions[ 'enable_email' ] = $_POST[ 'enable_email' ];
			
			// checkout settings
			$aOptions[ 'entrycurrency' ] = $_POST[ 'entrycurrency' ];
			$aOptions[ 'checkout_tax' ] = floatval( $_POST[ 'checkout_tax' ] );
			$aOptions[ 'checkout_ship' ] = $_POST[ 'checkout_ship' ];
			$aOptions[ 'use_checkout_voucher' ] = $_POST[ 'use_checkout_voucher' ];
			$aOptions[ 'checkout_voucher' ] = $_POST[ 'checkout_voucher' ];
			$aOptions[ 'paypalcurrency' ] = $_POST[ 'paypalcurrency' ];

			// home page layout
			$aOptions[ 'hp_layout' ] = $_POST[ 'hp_layout' ];
			$aOptions[ 'use_extra_tb' ] = $_POST[ 'use_extra_tb' ];
			$aOptions[ 'extra_tb_title' ] = $_POST[ 'extra_tb_title' ];
			$aOptions[ 'extra_tb_text' ] = $_POST[ 'extra_tb_text' ];
			$aOptions[ 'hp_num_products' ] = intval( $_POST[ 'hp_num_products' ] );
			$aOptions[ 'hp_paginas' ] = $_POST[ 'hp_paginas' ];
			$aOptions[ 'hp_custom_show_title' ] = $_POST[ 'hp_custom_show_title' ];
			$aOptions[ 'hp_custom_show_content' ] = $_POST[ 'hp_custom_show_content' ];
			
			// slider
			$aOptions[ 'useslider' ] = $_POST[ 'useslider' ];
			$aOptions[ 'slidertype' ] = $_POST[ 'slidertype' ];
			$aOptions[ 'sstiming' ] = floatval( $_POST[ 'sstiming' ] );
			$aOptions[ 'ssmode' ] = $_POST[ 'ssmode' ];
			$aOptions[ 'sseff' ] = $_POST[ 'sseff' ];
			$aOptions[ 'ssslices' ] = intval( $_POST[ 'ssslices' ] );
			$aOptions[ 'ssboxCols' ] = intval( $_POST[ 'ssboxCols' ] );
			$aOptions[ 'ssboxRows' ] = intval( $_POST[ 'ssboxRows' ] );
			$aOptions[ 'ssanimSpeed' ] = floatval( $_POST[ 'ssanimSpeed' ] );
			$aOptions[ 'ssprevText' ] = $_POST[ 'ssprevText' ];
			$aOptions[ 'ssnextText' ] = $_POST[ 'ssnextText' ];
			/*Piecemaker*/
			$aOptions[ 'pm_pieces' ] = $_POST[ 'pm_pieces' ];
			$aOptions[ 'pm_time' ] = $_POST[ 'pm_time' ];
			$aOptions[ 'pm_transition' ] = $_POST[ 'pm_transition' ];
			$aOptions[ 'pm_delay' ] = $_POST[ 'pm_delay' ];
			$aOptions[ 'pm_depthoffset' ] = $_POST[ 'pm_depthoffset' ];
			$aOptions[ 'pm_cubedistance' ] = $_POST[ 'pm_cubedistance' ];
			$aOptions[ 'pm_loadercolor' ] = $_POST[ 'pm_loadercolor' ];
			$aOptions[ 'pm_innersidecolor' ] = $_POST[ 'pm_innersidecolor' ];
			$aOptions[ 'pm_sideshadowalpha' ] = $_POST[ 'pm_sideshadowalpha' ];
			$aOptions[ 'pm_dropshadowalpha' ] = $_POST[ 'pm_dropshadowalpha' ];
			$aOptions[ 'pm_dropshadowdistance' ] = $_POST[ 'pm_dropshadowdistance' ];
			$aOptions[ 'pm_dropshadowscale' ] = $_POST[ 'pm_dropshadowscale' ];
			$aOptions[ 'pm_dropshadowblurx' ] = $_POST[ 'pm_dropshadowblurx' ];
			$aOptions[ 'pm_dropshadowblury' ] = $_POST[ 'pm_dropshadowblury' ];
			$aOptions[ 'pm_menudistancex' ] = $_POST[ 'pm_menudistancex' ];
			$aOptions[ 'pm_menudistancey' ] = $_POST[ 'pm_menudistancey' ];
			$aOptions[ 'pm_menucolor1' ] = $_POST[ 'pm_menucolor1' ];
			$aOptions[ 'pm_menucolor2' ] = $_POST[ 'pm_menucolor2' ];
			$aOptions[ 'pm_menucolor3' ] = $_POST[ 'pm_menucolor3' ];
			$aOptions[ 'pm_controlsize' ] = $_POST[ 'pm_controlsize' ];
			$aOptions[ 'pm_controldistance' ] = $_POST[ 'pm_controldistance' ];
			$aOptions[ 'pm_controlcolor1' ] = $_POST[ 'pm_controlcolor1' ];
			$aOptions[ 'pm_controlcolor2' ] = $_POST[ 'pm_controlcolor2' ];
			$aOptions[ 'pm_controlalpha' ] = $_POST[ 'pm_controlalpha' ];
			$aOptions[ 'pm_controlalphaover' ] = $_POST[ 'pm_controlalphaover' ];
			$aOptions[ 'pm_controlsx' ] = $_POST[ 'pm_controlsx' ];
			$aOptions[ 'pm_controlsy' ] = $_POST[ 'pm_controlsy' ];
			$aOptions[ 'pm_controlsalign' ] = $_POST[ 'pm_controlsalign' ];
			$aOptions[ 'pm_tooltipheight' ] = $_POST[ 'pm_tooltipheight' ];
			$aOptions[ 'pm_tooltipcolor' ] = $_POST[ 'pm_tooltipcolor' ];
			$aOptions[ 'pm_tooltiptexty' ] = $_POST[ 'pm_tooltiptexty' ];
			$aOptions[ 'pm_tooltiptextstyle' ] = $_POST[ 'pm_tooltiptextstyle' ];
			$aOptions[ 'pm_tooltiptextcolor' ] = $_POST[ 'pm_tooltiptextcolor' ];
			$aOptions[ 'pm_tooltipmarginleft' ] = $_POST[ 'pm_tooltipmarginleft' ];
			$aOptions[ 'pm_tooltipmarginright' ] = $_POST[ 'pm_tooltipmarginright' ];
			$aOptions[ 'pm_tooltiptextsharpness' ] = $_POST[ 'pm_tooltiptextsharpness' ];
			$aOptions[ 'pm_tooltiptextthickness' ] = $_POST[ 'pm_tooltiptextthickness' ];
			$aOptions[ 'pm_infowidth' ] = $_POST[ 'pm_infowidth' ];
			$aOptions[ 'pm_infobackground' ] = $_POST[ 'pm_infobackground' ];
			$aOptions[ 'pm_infobackgroundalpha' ] = $_POST[ 'pm_infobackgroundalpha' ];
			$aOptions[ 'pm_infomargin' ] = $_POST[ 'pm_infomargin' ];
			$aOptions[ 'pm_infosharpness' ] = $_POST[ 'pm_infosharpness' ];
			$aOptions[ 'pm_infothickness' ] = $_POST[ 'pm_infothickness' ];
			$aOptions[ 'pm_autoplay' ] = $_POST[ 'pm_autoplay' ];
			$aOptions[ 'pm_fieldofview' ] = $_POST[ 'pm_fieldofview' ];
			
			// stock inventory
			$aOptions[ 'use_stock' ] = $_POST[ 'use_stock' ];
			$aOptions[ 'stock_notify_on_low' ] = $_POST[ 'stock_notify_on_low' ];
			$aOptions[ 'stock_notify_email' ] = $_POST[ 'stock_notify_email' ];
			
			// breadcrumbs
			$aOptions[ 'usebread' ] = $_POST[ 'usebread' ];
			// trim summary
			$aOptions[ 'trim_summary' ] = intval( $_POST[ 'trim_summary' ] );
			// disable comments
			$aOptions[ 'disable_comments' ] = $_POST[ 'disable_comments' ];
			// social
			$aOptions[ 'social_set' ] = $_POST[ 'social_set' ];
			// copyright text
			$aOptions[ 'copytext' ] = $_POST[ 'copytext' ];
			// contact
			$aOptions[ 'send_form' ] = $_POST[ 'send_form' ];
			// google fonts library
			$aOptions[ 'google_fonts' ] = $_POST[ 'google_fonts' ];
			// colorbox width/height
			$aOptions[ 'cb_width' ] = intval( $_POST[ 'cb_width' ] );
			$aOptions[ 'cb_height' ] = intval( $_POST[ 'cb_height' ] );
			$aOptions[ 'cb_height_small' ] = intval( $_POST[ 'cb_height_small' ] );
			
			update_option( 'suppastore_theme', $aOptions );

		}
		
		add_theme_page( 'Sofa SuppaStore Options', 'SofaSuppaStore Options', 'edit_themes', basename( __FILE__ ), array( 'SofaSuppaStore', 'displayOptions' ) );
	}
	
	function initOptions( $bReset ) {
		$aOptions = get_option( 'suppastore_theme' );
		if( !is_array( $aOptions) || $bReset ) {
			// product
			$aOptions[ 'num_of_def_boxes' ] = 5;
			$aOptions[ 'prod_use_description' ] = 'yes';
			$aOptions[ 'prod_description_trim' ] = 25;
			$aOptions[ 'prod_use_related' ] = 'yes';
			$aOptions[ 'prod_disable_comments' ] = 'no';
			
			// general
			$aOptions[ 'paypal_mode' ] = 'sandbox';
			$aOptions[ 'ppal' ] = 'yourpaypaladdress@yourdomain.ext';
			$aOptions[ 'enable_email' ] = 'yes';
			
			// checkout settings
			$aOptions[ 'entrycurrency' ] = '&#36;';
			$aOptions[ 'checkout_tax' ] = 0;
			$aOptions[ 'checkout_ship' ] = 0;
			$aOptions[ 'use_checkout_voucher' ] = 'yes';
			$aOptions[ 'checkout_voucher' ] = 0;
			$aOptions[ 'paypalcurrency' ] = 'USD';
			
			// home page layout
			$aOptions[ 'hp_layout' ] = '';
			$aOptions[ 'use_extra_tb' ] = 'yes';
			$aOptions[ 'extra_tb_title' ] = 'Welcome!';
			$aOptions[ 'extra_tb_text' ] = 'This is an extra text block. It can be easily added from theme Options page, Home Page Layout section. Feel free to format this chunk of text on the way you like!';
			$aOptions[ 'hp_num_products' ] = 6;
			$aOptions[ 'hp_paginas' ] = 'yes';
			$aOptions[ 'hp_custom_show_title' ] = 'yes';
			$aOptions[ 'hp_custom_show_content' ] = 'yes';
			
			// slider
			$aOptions[ 'useslider' ] = 'yes';
			$aOptions[ 'slidertype' ] = 'jquery';
			$aOptions[ 'sstiming' ] = 3;
			$aOptions[ 'ssmode' ] = 'manual';
			$aOptions[ 'sseff' ] = 'random';
			$aOptions[ 'ssslices' ] = 10;
			$aOptions[ 'ssboxCols' ] = 8;
			$aOptions[ 'ssboxRows' ] = 4;
			$aOptions[ 'ssanimSpeed' ] = 0.4;
			$aOptions[ 'ssprevText' ] = 'Previous slide';
			$aOptions[ 'ssnextText' ] = 'Next slide';
			/*Piecemaker*/
			$aOptions[ 'pm_pieces' ] = 6;
			$aOptions[ 'pm_time' ] = 0.9;
			$aOptions[ 'pm_transition' ] = 'easeInOutBack';
			$aOptions[ 'pm_delay' ] = 0.1;
			$aOptions[ 'pm_depthoffset' ] = 900;
			$aOptions[ 'pm_cubedistance' ] = 30;
			$aOptions[ 'pm_loadercolor' ] = '0x333333';
			$aOptions[ 'pm_innersidecolor' ] = '0x000000';
			$aOptions[ 'pm_sideshadowalpha' ] = 0.8;
			$aOptions[ 'pm_dropshadowalpha' ] = 0.7;
			$aOptions[ 'pm_dropshadowdistance' ] = 0;
			$aOptions[ 'pm_dropshadowscale' ] = 0;
			$aOptions[ 'pm_dropshadowblurx' ] = 0;
			$aOptions[ 'pm_dropshadowblury' ] = 0;
			$aOptions[ 'pm_menudistancex' ] = 20;
			$aOptions[ 'pm_menudistancey' ] = 0;
			$aOptions[ 'pm_menucolor1' ] = '0x999999';
			$aOptions[ 'pm_menucolor2' ] = '0x333333';
			$aOptions[ 'pm_menucolor3' ] = '0xFFFFFF';
			$aOptions[ 'pm_controlsize' ] = 50;
			$aOptions[ 'pm_controldistance' ] = 20;
			$aOptions[ 'pm_controlcolor1' ] = '0xFFFFFF';
			$aOptions[ 'pm_controlcolor2' ] = '0x000000';
			$aOptions[ 'pm_controlalpha' ] = 0.8;
			$aOptions[ 'pm_controlalphaover' ] = 0.95;
			$aOptions[ 'pm_controlsx' ] = 465;
			$aOptions[ 'pm_controlsy' ] = 300;
			$aOptions[ 'pm_controlsalign' ] = 'center';
			$aOptions[ 'pm_tooltipheight' ] = 31;
			$aOptions[ 'pm_tooltipcolor' ] = '0xFFFFFF';
			$aOptions[ 'pm_tooltiptexty' ] = 5;
			$aOptions[ 'pm_tooltiptextstyle' ] = 'P-Italic';
			$aOptions[ 'pm_tooltiptextcolor' ] = '0x000000';
			$aOptions[ 'pm_tooltipmarginleft' ] = 5;
			$aOptions[ 'pm_tooltipmarginright' ] = 7;
			$aOptions[ 'pm_tooltiptextsharpness' ] = 50;
			$aOptions[ 'pm_tooltiptextthickness' ] = -100;
			$aOptions[ 'pm_infowidth' ] = 300;
			$aOptions[ 'pm_infobackground' ] = '0x000000';
			$aOptions[ 'pm_infobackgroundalpha' ] = 0.85;
			$aOptions[ 'pm_infomargin' ] = 15;
			$aOptions[ 'pm_infosharpness' ] = 0;
			$aOptions[ 'pm_infothickness' ] = 0;
			$aOptions[ 'pm_autoplay' ] = 3;
			$aOptions[ 'pm_fieldofview' ] = 55;

			// stock inventory
			$aOptions[ 'use_stock' ] = 'yes';
			$aOptions[ 'stock_notify_on_low' ] = 'no';
			$aOptions[ 'stock_notify_email' ] = '';
			
			// breadcrumbs
			$aOptions[ 'usebread' ] = 'yes';
			// trim summary
			$aOptions[ 'trim_summary' ] = 45;
			// disable comments
			$aOptions[ 'disable_comments' ] = 'no';
			// social
			$aOptions[ 'social_set' ] = '<a href="' . get_bloginfo( 'rss2_url' ) . '" class="icorss" target="_blank">RSS News</a><a href="http://twitter.com" class="icotwitter" target="_blank">Follow Us!</a><a href="http://facebook.com" class="icofacebook" target="_blank">Facebook</a>';
			// copyright text
			$aOptions[ 'copytext' ] = '&copy; Company Name 2010. All rights reserved.';
			// contact
			$aOptions[ 'send_form' ] = '';
			// google fonts library
			$aOptions[ 'google_fonts' ] = 'Yanone+Kaffeesatz:light,regular,bold';
			// colorbox width/height
			$aOptions[ 'cb_width' ] = 720;
			$aOptions[ 'cb_height' ] = 480;
			$aOptions[ 'cb_height_small' ] = 320;
			
		}
		return $aOptions;
	}

	function displayOptions () {
		$aOptions = SofaSuppaStore::initOptions( false );
		// Auto-creator for all Custom Templates
		require_once( TEMPLATEPATH . '/administration/auto_custom_templates.php' );
?>
<?php wp_print_scripts( 'jquery' ); ?>
<script type="text/javascript" src="<?php echo( get_template_directory_uri() . '/script/prototype.js' ); ?>"></script>
<script src="<?php echo( get_template_directory_uri() . '/script/prototype-effects.js' ); ?>" type="text/javascript"></script>

<script type="text/javascript">  
function ajaxUpd( id, url ) {  
	new Ajax.Updater( id, url, { asynchronous: true } );  
	document.getElementById( "installer" ).style.display = "none";
	document.getElementById( "responder" ).style.border = "none";
} 
function hideButt() {
	document.getElementById( "updateme" ).style.color = "green";
	document.getElementById( "responder" ).style.border = "none";
	document.getElementById( "updateme" ).innerHTML = "Required dataBase table has been properly installed!";
	document.getElementById( "installer" ).style.display = "none";
}
</script>

<style type="text/css"> 
.mymenu {
	margin-top: 50px;
	overflow: hidden;
	float: left;
	display: inline;
}
.mymenu p { font-family: Tahoma, Geneva, sans-serif; border-bottom: 1px dotted #CCC; font-weight: normal; padding: 10px; background-color: #F1F1F1; width: 200px; margin: 0; }
.mymenu p a { text-decoration: none; }
.mytable {
	width: 600px;
	padding: 0;
	margin: 50px 0 20px 0;
	font: 11px "Trebuchet MS", Verdana, Arial, Helvetica, sans-serif;
	border: 1px dotted #CCC;
	float: left;
	display: inline;
}
tbody { width: 600px; background-color: #FFF; overflow: hidden; }
td {
	border-bottom: 1px dotted #CCC;
	background-color: #fff;
	padding: 10px;
	color: #4f6b72;
	width: 578px;
}
td.right {
	text-align: right;
	border: none;
}
input, textarea, select.mlist {
	border: 1px solid #CFCFCF;
}
#wpcontent select.mlist {
	height: 200px;
	width: 200px;
	overflow: scroll;
}
#wpcontent .row {
	background-color: #F1F1F1; overflow: hidden; height: 30px; width: 700px; padding: 5px 10px 10px 10px; margin-bottom: 10px;
}
#wpcontent .cbholder {
	width: 300px; float: left; display: inline; padding: 11px 0 0 0;
}
#wpcontent .snholder {
	width: 300px; float: left; display: inline; padding: 5px 0;
}
#wpcontent .clear { height: 10px; width: 600px; clear: both; }
textarea {
	width: 99%;
}
p {
	font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
	color: #666666;
}
span.exp {
	font-weight: normal;
	font-style: italic;
}
.centered { 
	font-size: 11px; 
	font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
	color: #666666;
	vertical-align: top; 
}
</style>
<script src="<?php echo( get_template_directory_uri() . '/script/jcookie.js' ); ?>" type="text/javascript"></script>
<script language="javascript" type="text/javascript">
jQuery( document ).ready( function() {
	
	jQuery( '[id^=toggle-item]' ).hide();
	var curr_cookie = jQuery.cookie( "openpresspanel" );
	if( curr_cookie != null ) jQuery( curr_cookie ).show();
	else jQuery( '[id^=toggle-item-toggler1]' ).show();
	jQuery( '[class^=toggler]' ).click( function() {
		jQuery( '[id^=toggle-item-toggler]' ).hide();
		var $this = jQuery( this );
		var x = $this.attr( "class" );
		var who = "#toggle-item-" + x;
		jQuery( who ).fadeIn( 200 );
		jQuery.cookie( "openpresspanel", who );
		return false;
	} );
	
	jQuery( '#entrycurrency' ).change( function() {
		var obey_this_elem = jQuery( 'option:selected', this ).attr( 'title' );
		jQuery( '#paypalcurrency' ).val( obey_this_elem );
	} );
	
	jQuery( '#paypalcurrency' ).val( "<?php echo $aOptions[ 'paypalcurrency' ]; ?>" );

} );
</script>
<div class="wrap">
	<h2>Sofa SuppaStore Theme Options</h2>
    <form action="#" method="post" enctype="multipart/form-data" name="massive_form" id="massive_form">
    
    <div class="mymenu">
    	<p><a href="#" class="toggler1">&raquo; Install Required dataBase Tables</a></p>
    	<p><a href="#" class="toggler2">&raquo; Payment Gateway Settings</a></p>
        <p><a href="#" class="toggler3">&raquo; Payment Settings</a></p>
        <p><a href="#" class="toggler4">&raquo; Products</a></p>
        <p><a href="#" class="toggler5">&raquo; Home Page Images Slider</a></p>
        <p><a href="#" class="toggler6">&raquo; Home Page Layout</a></p>
        <p><a href="#" class="toggler7">&raquo; Stock Inventory</a></p>
        <p><a href="#" class="toggler8">&raquo; General Options/Settings</a></p>
    </div>
    
    <table class="mytable" id="toggle-item-toggler1">
      <tr>
        <td>
            <h2>Install Required dataBase Tables</h2>
            <p>Additional database table needs to be installed for this theme! Click "Install Additional Table" button and let the system do the hard job for you. This additional table will enable Admin to have a clean overview of all purchases/transaction details.</p>
        </td>
      </tr>
      <tr>
        <td id="responder">
            <div id="updateme">Awaiting response...</div>
        </td>
      </tr>
      <tr id="installer" name="installer">
        <td class="right">
        <?php
		global $wpdb;
		$purchase_history_table_name = $wpdb->prefix . 'purchases_history';
		
		if( $wpdb->get_var( "show tables like '$purchase_history_table_name'" ) != $purchase_history_table_name ) {
		?>
        <input type="button" value="Install Additional Table" style="background-color: red; color: #FFF;" onClick="ajaxUpd( 'updateme', '<?php echo( get_template_directory_uri() . '/sql_create.php' ); ?>' )">
        <?php
		} else echo '<script type="text/javascript">hideButt();</script>';
		?>
        </td>
      </tr>
    </table>
                
    <table class="mytable" id="toggle-item-toggler2">
      <tr>
        <td>
            <h2>Payment Gateway Settings</h2>
            <p>Test your webshop before you decide to make it "alive"! Switch between test ('sandbox', still requires valid testing account) and real mode.</p>
        </td>
      </tr>
      <tr>
        <td>
        <p><strong>PayPal Mode</strong></p>
        <p>Please note that Sandbox mode still requires PayPal account. You can get one <a href="https://developer.paypal.com/" target="_blank">HERE</a>.</p>
        <p>Select PayPal Mode [ <span class="exp">Sandbox or PayPal</span> ]</p>
            <select id="paypal_mode" name="paypal_mode" size="1">
                <?php
                if( $aOptions[ 'paypal_mode' ] == 'sandbox' ) {
                ?>
                <option value="sandbox" selected="selected"> - Sandbox - </option>
                <option value="paypal"> - PayPal - </option>
                <?php
                } else if( $aOptions[ 'paypal_mode' ] == 'paypal' ) {
                ?>
                <option value="sandbox"> - Sandbox - </option>
                <option value="paypal" selected="selected"> - PayPal - </option>
                <?php
                } else {
                ?>
                <option value="sandbox" selected="selected"> - Sandbox - </option>
                <option value="paypal"> - PayPal - </option>
                <?php
                }
                ?>
            </select>
        </td>
      </tr>
      <tr>
        <td>
        <p><strong>PayPal account e-mail address</strong></p>
        <p>It doesn't make the difference whether you run this theme in Sandbox or PayPal mode, both require valid e-mail address!</p>
        <p>PayPal e-mail address [ <span class="exp">Must be valid Sandbox or Business PayPal account!</span> ]</p>
        <input name="ppal" id="ppal" value="<?php echo $aOptions[ 'ppal' ]; ?>" size="50" ></input>
        </td>
      </tr>
      <tr>
        <td>
        <p><strong>Enable users to place order by e-mail?</strong></p>
        <p>If YES, E-mail Order button will appear at Checkout page.</p>
        <p>On a side note, be aware of the fact that Stock Inventory will not be updated after placing an e-mail order due to the fact the payment hasn't been actually made.</p>
        <p>Enable e-mail orders? [ <span class="exp">select yes or no</span> ]</p>
            <select id="enable_email" name="enable_email" size="1">
                <?php
                if( $aOptions[ 'enable_email' ] == 'yes' ) {
                ?>
                <option value="yes" selected="selected"> - YES - </option>
                <option value="no"> - NO - </option>
                <?php
                } else if( $aOptions[ 'enable_email' ] == 'no' ) {
                ?>
                <option value="yes"> - YES - </option>
                <option value="no" selected="selected"> - NO - </option>
                <?php
                } else {
                ?>
                <option value="yes" selected="selected"> - YES - </option>
                <option value="no"> - NO - </option>
                <?php
                }
                ?>
            </select>
        </td>
      </tr>
      <tr>
        <td class="right"><input type="submit" name="suppastore_save" value="Save Options" /></td>
      </tr>
    </table>
    
    <table class="mytable" id="toggle-item-toggler3">
      <tr>
        <td>
            <h2>Payment Settings</h2>
            <p>Currecy, Tax and Shipping price</p>
        </td>
      </tr>
      <tr>
        <td>
        <p><strong>Default currency used by your webshop</strong></p>
        <p>All the payments will be made in currency of your choice and as such will appear on reports.</p>
        <p>Select Currency? [ <span class="exp">Select</span> ]</p>
        <input type="hidden" name="paypalcurrency" id="paypalcurrency" value="<?php echo $aOptions[ 'paypalcurrency' ]; ?>" size="5" />
        <?php
        $currency = array( "USD", "GBP", "AUD", "CAD", "CZK", "DKK", "EUR", "HKD", "HUF", "ILS", "JPY", "MXN", "NOK", "NZD", "PLN", "SGD", "SEK", "CHF" ); 
        $curr_cod = array( "&#36;", "&pound;", "&#36;", "&#36;", "Kč", "kr", "&euro;", "&#36;", "Ft", "&#8362;", "&#165;", "&#36;", "kr", "&#36;", "zl", "&#36;", "kr", "Fr" );
		$curr_sym = array( "$", "£", "$", "$", "Kč", "kr", "€", "$", "Ft", "₪", "¥", "$", "kr", "$", "zl", "$", "kr", "Fr" );
        echo '<select name="entrycurrency" id="entrycurrency">';
        $iter_curr = 0;
        $leng_curr = count( $currency );
        while( $iter_curr < $leng_curr ) {
            echo '<option value="' . $curr_cod[ $iter_curr ] . '"';
            if( $aOptions[ 'entrycurrency' ] == $curr_sym[ $iter_curr ] && $currency[ $iter_curr ] == $aOptions[ 'paypalcurrency' ] ) { echo ' selected="selected"'; $TEMP = $iter_curr; }
            echo ' title="' . $currency[ $iter_curr ] . '">' . $currency[ $iter_curr ] . ' ( ' . $curr_cod[ $iter_curr ] . ' )</option>';
            $iter_curr ++;
        }
        echo '</select>';
        ?>
        </td>
      </tr>
      <tr>
        <td>
        <p><strong>Tax</strong></p>
        <p>If the product prices in your webshop are declared without the tax, you might want to set it up here. Enter percentage for your country or region. (Don't enter % at the end!)</p>
        <p>Tax percentage [ <span class="exp">Number, floating</span> ]</p>
        <input name="checkout_tax" id="checkout_tax" value="<?php echo $aOptions[ 'checkout_tax' ]; ?>" size="5" ></input> %
        </td>
      </tr>
      <tr>
        <td>
        <p><strong>Shipping countries and Handling prices</strong></p>
        <p>If the products in your webshop doesn't include individual shipping price you can set the global one here. It'll be added to the price Subtotal and Tax value (if any!) regardless the weight (size) or the number of products in shopping basket.<br />
        Make the list of shipping countries and all the expenses that relate to product(s) shipping and handling.<br />Your list must be properly formatted as well!!! Use the following format to populate the list: ShippingCountry*NN.NN. For example:<br />
        <strong>USA*00.00</strong><br />
        <strong>Canada*19.00</strong><br />
        <strong>Netherlands*34.55</strong><br />
        ...where NN.NN represents the shipping and/or handling price.<br />
        <font style="color: red;">Hit Enter for each new ShippingCountry*NN.NN pair! Use 00.00 if shipping and/or handling is free of charge or your products include individual shipping price.</font>
        </p>
        <p>Make the list [ <span class="exp">List format, ShippingCountry*NN.NN</span> ]</p>
        <textarea name="checkout_ship" cols="60" rows="10" id="checkout_ship"><?php echo stripslashes( $aOptions[ 'checkout_ship' ] ); ?></textarea>
        </td>
      </tr>
      <tr>
        <td>
        <p><strong>Coupon codes</strong></p>
        <p>Do you want to enable the usage of coupons (coupon codes aka vouchers) at the Checkout page? If true, select 'yes' and procedd to the next (below) option.</p>
        <p>Enable Coupon Codes? [ select <span class="exp">yes or no</span> ]</p>
            <select id="use_checkout_voucher" name="use_checkout_voucher" size="1">
                <?php
                if( $aOptions[ 'use_checkout_voucher' ] == 'yes' ) {
                ?>
                <option value="yes" selected="selected"> - YES - </option>
                <option value="no"> - NO - </option>
                <?php
                } else if( $aOptions[ 'use_checkout_voucher' ] == 'no' ) {
                ?>
                <option value="yes"> - YES - </option>
                <option value="no" selected="selected"> - NO - </option>
                <?php
                } else {
                ?>
                <option value="yes" selected="selected"> - YES - </option>
                <option value="no"> - NO - </option>
                <?php
                }
                ?>
            </select>
        </td>
      </tr>
      <tr>
        <td>
        <p>If you decided to share some coupon codes with your customers and enable certain discount at the checkout page, you may set the list of coupon codes and belonging discount percentage.<br />
        Of course, your list must be properly formatted! Use the following format to populate the list: CouponCode*NN.NN. For example:<br />
        <strong>0Fx1059d788q*10.00</strong><br />
        <strong>d44MMcvser54*15.00</strong><br />
        <strong>LBN556I987Op*25.00</strong><br />
        ...where NN.NN represents the percentage of discount.<br />
        <font style="color: red;">Hit Enter for each new CouponCode*NN.NN! Code MUST BE alphanumeric only, minimum 5 characters and max. 12 chars!!!</font>
        </p>
        <p>Make the list [ <span class="exp">List format, CouponCode*NN.NN</span> ]</p>
        <textarea name="checkout_voucher" cols="60" rows="10" id="checkout_voucher"><?php echo stripslashes( $aOptions[ 'checkout_voucher' ] ); ?></textarea>
        </td>
      </tr>
      
      <tr>
        <td class="right"><input type="submit" name="suppastore_save" value="Save Options" /></td>
      </tr>
    </table>

<table class="mytable" id="toggle-item-toggler4">
  <tr>
    <td>
        <h2>Products</h2>
        <p>Crucial settings for products in your webshop.</p>
    </td>
  </tr>
  <tr>
    <td>
    <p><strong>Number of Definition Boxes per Product.</strong></p>
    <p>One single Definition Box allows you to add single size, stock, price and individual shipping price value for your product. Multiple Definition Boxes allow more than just one set of values.</p>
    <p>How many Definition Boxes do you need? [ <span class="exp">Number, Integer</span> ]</p>
    <input name="num_of_def_boxes" id="num_of_def_boxes" value="<?php echo $aOptions[ 'num_of_def_boxes' ]; ?>" size="5" ></input> Definition Boxes
    </td>
  </tr>
  <tr>
    <td>
    <p><strong>Use description (aka summary) for Product listed at Home page and Category page?</strong></p>
    <p>The text can be shown below each product image if you like to. Next option (see below) lets you define the exact number of words used as a product summary.</p>
    <p>Use Product text summary? [ select <span class="exp">yes or no</span> ]</p>
        <select id="prod_use_description" name="prod_use_description" size="1">
        	<?php
			if( $aOptions[ 'prod_use_description' ] == 'yes' ) {
			?>
        	<option value="yes" selected="selected"> - YES - </option>
            <option value="no"> - NO - </option>
            <?php
			} else if( $aOptions[ 'prod_use_description' ] == 'no' ) {
			?>
        	<option value="yes"> - YES - </option>
            <option value="no" selected="selected"> - NO - </option>
            <?php
			} else {
			?>
        	<option value="yes" selected="selected"> - YES - </option>
            <option value="no"> - NO - </option>
			<?php
			}
			?>
        </select>
    </td>
  </tr>
  <tr>
    <td>
    <p><strong>Trim Product text summary to N number of words</strong></p>
    <p>Product description will be trimmed to N number of words if "Use Product text summary?" was set to YES.</p>
    <p>Trim to [ <span class="exp">number, integer (for example: 5)</span> ]</p>
    <input name="prod_description_trim" id="prod_description_trim" value="<?php echo $aOptions[ 'prod_description_trim' ]; ?>" size="5" ></input> words.
    </td>
  </tr>
  <tr>
    <td>
    <p><strong>Use related Products scroller on Product details page?</strong></p>
    <p>Related products will work only in case your products are tagged. It means that you will need to populate Product tags otherwise Related products scroller will not work.</p>
    <p>Use related Products scroller? [ select <span class="exp">yes or no</span> ]</p>
        <select id="prod_use_related" name="prod_use_related" size="1">
        	<?php
			if( $aOptions[ 'prod_use_related' ] == 'yes' ) {
			?>
        	<option value="yes" selected="selected"> - YES - </option>
            <option value="no"> - NO - </option>
            <?php
			} else if( $aOptions[ 'prod_use_related' ] == 'no' ) {
			?>
        	<option value="yes"> - YES - </option>
            <option value="no" selected="selected"> - NO - </option>
            <?php
			} else {
			?>
        	<option value="yes" selected="selected"> - YES - </option>
            <option value="no"> - NO - </option>
			<?php
			}
			?>
        </select>
    </td>
  </tr>
  <tr>
    <td>
    <p><strong>Disable user comments for Products?</strong></p>
    <p>You can disable comments for Products globally if you like. That's how you don't need to disable it for each product individually.</p>
    <p>Disable Product comments? [ select <span class="exp">yes or no</span> ]</p>
        <select id="prod_disable_comments" name="prod_disable_comments" size="1">
        	<?php
			if( $aOptions[ 'prod_disable_comments' ] == 'yes' ) {
			?>
        	<option value="yes" selected="selected"> - YES - </option>
            <option value="no"> - NO - </option>
            <?php
			} else if( $aOptions[ 'prod_disable_comments' ] == 'no' ) {
			?>
        	<option value="yes"> - YES - </option>
            <option value="no" selected="selected"> - NO - </option>
            <?php
			} else {
			?>
        	<option value="yes" selected="selected"> - YES - </option>
            <option value="no"> - NO - </option>
			<?php
			}
			?>
        </select>
    </td>
  </tr>
  <tr>
    <td class="right"><input type="submit" name="suppastore_save" value="Save Options" /></td>
  </tr>
</table>
    
<table class="mytable" id="toggle-item-toggler5">
  <tr>
    <td colspan="2">
        <h2>Home Page Images Slider</h2>
        <p>
        It will be visible at Home Page, header section.<br />
        You can find more info on this great jQuery slider <a href="http://nivo.dev7studios.com/" target="_blank">HERE!</a>
        </p>
    </td>
  </tr>
  <tr>
    <td colspan="2">
    <p><strong>Enable Images Slider on Home Page or not?</strong></p>
    <p>If your slider doesn't contain any slides yet, from Dashboard select Nivo-slides > Add new.</p>
    <p>Use Images Slider? [ select <span class="exp">yes or no</span> ]</p>
        <select id="useslider" name="useslider" size="1">
        	<?php
			if( $aOptions[ 'useslider' ] == 'yes' ) {
			?>
        	<option value="yes" selected="selected"> - YES - </option>
            <option value="no"> - NO - </option>
            <?php
			} else if( $aOptions[ 'useslider' ] == 'no' ) {
			?>
        	<option value="yes"> - YES - </option>
            <option value="no" selected="selected"> - NO - </option>
            <?php
			} else {
			?>
        	<option value="yes" selected="selected"> - YES - </option>
            <option value="no"> - NO - </option>
			<?php
			}
			?>
        </select>
    </td>
  </tr>
  <tr>
    <td colspan="2">
    <p><strong>Which slider you'd like to use; Nivo (jQuery) or Piecemaker (Flash)?</strong></p>
    <p>All of Nivo slides will be used for Piecemaker as well!</p>
    <p>Preferred slider type? [ select <span class="exp">jquery or flash</span> ]</p>
        <select id="slidertype" name="slidertype" size="1">
        	<?php
			if( $aOptions[ 'slidertype' ] == 'jquery' ) {
			?>
        	<option value="jquery" selected="selected"> - jQuery (Nivo slider) - </option>
            <option value="flash"> - Flash (Piecemaker) - </option>
            <option value="static"> - None, I'll use static image - </option>
            <?php
			} else if( $aOptions[ 'slidertype' ] == 'flash' ) {
			?>
        	<option value="jquery"> - jQuery (Nivo slider) - </option>
            <option value="flash" selected="selected"> - Flash (Piecemaker) - </option>
            <option value="static"> - None, I'll use static image - </option>
            <?php
			} else if( $aOptions[ 'slidertype' ] == 'static' ) {
			?>
        	<option value="jquery"> - jQuery (Nivo slider) - </option>
            <option value="flash"> - Flash (Piecemaker) - </option>
            <option value="static" selected="selected"> - None, I'll use static image - </option>
            <?php
			} else {
			?>
        	<option value="jquery" selected="selected"> - jQuery (Nivo slider) - </option>
            <option value="flash"> - Flash (Piecemaker) - </option>
            <option value="static"> - None, I'll use static image - </option>
			<?php
			}
			?>
        </select>
    </td>
  </tr>
  <tr><td colspan="2"><h3>Nivo (jQuery) Slider Settings</h3></td></tr>
  <tr>
    <td colspan="2">
    <p><strong>Images Slider mode</strong></p>
    <p>Slider images can be auto-rotated or require user interaction.</p>
    <p>Slider mode [ select <span class="exp">auto or manual</span> ]</p>
        <select id="ssmode" name="ssmode" size="1">
            <?php
            if( $aOptions[ 'ssmode' ] == 'auto' ) {
            ?>
            <option value="auto" selected="selected"> - AUTO-ROTATE - </option>
            <option value="manual"> - MANUAL - </option>
            <?php
            } else if( $aOptions[ 'ssmode' ] == 'manual' ) {
            ?>
            <option value="auto"> - AUTO-ROTATE - </option>
            <option value="manual" selected="selected"> - MANUAL - </option>
            <?php
            } else {
            ?>
            <option value="auto" selected="selected"> - AUTO-ROTATE - </option>
            <option value="manual"> - MANUAL - </option>
            <?php
            }
            ?>
        </select>
    </td>
  </tr>
  <tr>
    <td colspan="2">
    <p><strong>Transition effect</strong></p>
    <p>There's a whole bunch of ready made effects that you can select from. Select the one that fits best to your webshop.</p>
    <p>Select Effect [ select <span class="exp">select</span> ]</p>
    <?php
	$arr_sseff = array( 'sliceDown', 'sliceDownLeft', 'sliceUp', 'sliceUpLeft', 'sliceUpDown', 'sliceUpDownLeft', 'fold', 'fade', 'random', 'slideInRight', 'slideInLeft', 'boxRandom', 'boxRain', 'boxRainReverse', 'boxRainGrow', 'boxRainGrowReverse' );
	?>
        <select id="sseff" name="sseff" size="1">
            <?php
			$sseff_active = $aOptions[ 'sseff' ];
            foreach( $arr_sseff as $sseff_val ) {
				if( $sseff_active == $sseff_val ) echo '<option value="' . $sseff_val . '" selected="selected"> - ' . $sseff_val . ' - </option>';
				else echo '<option value="' . $sseff_val . '"> - ' . $sseff_val . ' - </option>';
			}
            ?>
        </select>
    </td>
  </tr>
  <tr>
    <td colspan="2">
    <p><strong>Slider Timing</strong></p>
    <p>If your choice above was AUTO-ROTATE, you can set the timing here. Enter the number of seconds to pause before next slide.</p>
    <p>Seconds to pause [ <span class="exp">number, integer (for example: 3)</span> ]</p>
    <input name="sstiming" id="sstiming" value="<?php echo $aOptions[ 'sstiming' ]; ?>" size="5" ></input> seconds
    </td>
  </tr>
  <tr>
    <td colspan="2">
    <p><strong>Slices number</strong></p>
    <p>Used for slice animations.</p>
    <p>Use [ <span class="exp">number, integer (for example: 10)</span> ]</p>
    <input name="ssslices" id="ssslices" value="<?php echo $aOptions[ 'ssslices' ]; ?>" size="5" ></input> slices
    </td>
  </tr>
  <tr>
    <td colspan="2">
    <p><strong>Box Columns</strong></p>
    <p>Used for box animations.</p>
    <p>Use [ <span class="exp">number, integer (for example: 8)</span> ]</p>
    <input name="ssboxCols" id="ssboxCols" value="<?php echo $aOptions[ 'ssboxCols' ]; ?>" size="5" ></input> columns
    </td>
  </tr>
  <tr>
    <td colspan="2">
    <p><strong>Box Rows</strong></p>
    <p>Used for box animations.</p>
    <p>Use [ <span class="exp">number, integer (for example: 4)</span> ]</p>
    <input name="ssboxRows" id="ssboxRows" value="<?php echo $aOptions[ 'ssboxRows' ]; ?>" size="5" ></input> rows
    </td>
  </tr>
  <tr>
    <td colspan="2">
    <p><strong>Animation speed</strong></p>
    <p>Slide transition speed. OK values range from 0.1 to 0.9. Everything above 1 second will make transition sluggish.</p>
    <p>Seconds [ <span class="exp">number, floating (for example: 0.4)</span> ]</p>
    <input name="ssanimSpeed" id="ssanimSpeed" value="<?php echo $aOptions[ 'ssanimSpeed' ]; ?>" size="5" ></input> seconds
    </td>
  </tr>
  <tr>
    <td colspan="2">
    <p><strong>Previous slide button label</strong></p>
    <p>It will be used for localization purpose.</p>
    <p>Label text for 'Previous' [ <span class="exp">string</span> ]</p>
    <input name="ssprevText" id="ssprevText" value="<?php echo $aOptions[ 'ssprevText' ]; ?>" size="50" ></input>
    </td>
  </tr>
  <tr>
    <td colspan="2">
    <p><strong>Next slide button label</strong></p>
    <p>It will be used for localization purpose.</p>
    <p>Label text for 'Next' [ <span class="exp">string</span> ]</p>
    <input name="ssnextText" id="ssnextText" value="<?php echo $aOptions[ 'ssnextText' ]; ?>" size="50" ></input>
    </td>
  </tr>
  <tr>
    <td class="right" colspan="2"><input type="submit" name="suppastore_save" value="Save Options" /></td>
  </tr>
  
  <tr><td colspan="2"><h3>Piecemaker (Flash) Slider Settings</h3></td></tr>
      <tr>
        <td>
            <p><strong>Pieces</strong></p>
            <p>Number of pieces to which the image is sliced.</p>
            <input name="pm_pieces" id="pm_pieces" value="<?php echo $aOptions[ 'pm_pieces' ]; ?>" size="15" ></input>
        </td>
        <td>
            <p><strong>Time</strong></p>
            <p>Time for one cube to turn.</p>
            <input name="pm_time" id="pm_time" value="<?php echo $aOptions[ 'pm_time' ]; ?>" size="15" ></input>
        </td>
      </tr>
      <tr>
        <td>
            <p><strong>Transition</strong></p>
            <p>Transition type of the Tweener class. For more info on these types see the official Tweener Documentation and go to <a href="http://hosted.zeh.com.br/tweener/docs/en-us/" target="_blank">Transition Types</a>. The best results are achieved by those transition types, which begin with easeInOut.</p>
			<?php
            $tween_types = array( 'linear','easeInSine','easeOutSine', 'easeInOutSine', 'easeInCubic', 'easeOutCubic', 'easeInOutCubic', 'easeOutInCubic', 'easeInQuint', 'easeOutQuint', 'easeInOutQuint', 'easeOutInQuint', 'easeInCirc', 'easeOutCirc', 'easeInOutCirc', 'easeOutInCirc', 'easeInBack', 'easeOutBack', 'easeInOutBack', 'easeOutInBack', 'easeInQuad', 'easeOutQuad', 'easeInOutQuad', 'easeOutInQuad', 'easeInQuart', 'easeOutQuart', 'easeInOutQuart', 'easeOutInQuart', 'easeInExpo', 'easeOutExpo', 'easeInOutExpo', 'easeOutInExpo', 'easeInElastic', 'easeOutElastic', 'easeInOutElastic', 'easeOutInElastic', 'easeInBounce', 'easeOutBounce', 'easeInOutBounce', 'easeOutInBounce' );
            
            $count_tweens = 0;
            $tweens_length = count( $tween_types );
            $saved_tween_type = $aOptions[ 'pm_transition' ];
            echo '<select id="pm_transition" name="pm_transition" size="1">';
            while( $count_tweens < $tweens_length ) {
                if( $saved_tween_type == $tween_types[ $count_tweens ] ) $add_str_tween = ' selected="selected" ';
                else $add_str_tween = ' ';
                $option = '<option' . $add_str_tween . 'value="' . $tween_types[ $count_tweens ] . '"> - ';
                $option .= $tween_types[ $count_tweens ];
                $option .= ' - </option>';
                echo $option;
                $count_tweens ++;
            }
            echo '</select>';
            ?>
        </td>
        <td>
            <p><strong>Delay</strong></p>
            <p>Delay between the start of one cube to the start of the next cube.</p>
            <input name="pm_delay" id="pm_delay" value="<?php echo $aOptions[ 'pm_delay' ]; ?>" size="15" ></input>
        </td>
      </tr>
      <tr>
        <td>
            <p><strong>DepthOffset</strong></p>
            <p>The offset during transition on the z-axis. Value between 100 and 1000 are recommended. But go for experiments..</p>
            <input name="pm_depthoffset" id="pm_depthoffset" value="<?php echo $aOptions[ 'pm_depthoffset' ]; ?>" size="15" ></input>
        </td>
        <td>
            <p><strong>CubeDistance</strong></p>
            <p>The distance between the cubes during transition. Values between 5 and 50 are recommended. But go for experiments.</p>
            <input name="pm_cubedistance" id="pm_cubedistance" value="<?php echo $aOptions[ 'pm_cubedistance' ]; ?>" size="15" ></input>
        </td>
      </tr>
      <tr>
        <td>
            <p><strong>LoaderColor</strong></p>
            <p>Color of the cubes before the first image appears, also the color of the back sides of the cube, which become visible at some transition types.</p>
            <input name="pm_loadercolor" id="pm_loadercolor" value="<?php echo $aOptions[ 'pm_loadercolor' ]; ?>" size="15" ></input>
        </td>
        <td>
            <p><strong>InnerSideColor</strong></p>
            <p>Color of the inner sides of the cube when sliced.</p>
            <input name="pm_innersidecolor" id="pm_innersidecolor" value="<?php echo $aOptions[ 'pm_innersidecolor' ]; ?>" size="15" ></input>
        </td>
      </tr>
      <tr>
        <td>
            <p><strong>SideShadowAlpha</strong></p>
            <p>Sides get darker when moved away from the front. This is the degree of darkness - 0 == no change, 1 == 100% black.</p>
            <input name="pm_sideshadowalpha" id="pm_sideshadowalpha" value="<?php echo $aOptions[ 'pm_sideshadowalpha' ]; ?>" size="15" ></input>
        </td>
        <td>
            <p><strong>DropShadowAlpha</strong></p>
            <p>Alpha of the drop shadow - 0 == no shadow, 1 == opaque.</p>
            <input name="pm_dropshadowalpha" id="pm_dropshadowalpha" value="<?php echo $aOptions[ 'pm_dropshadowalpha' ]; ?>" size="15" ></input>
        </td>
      </tr>
      <tr>
        <td>
            <p><strong>DropShadowDistance</strong></p>
            <p>Distance of the shadow from the bottom of the image.</p>
            <input name="pm_dropshadowdistance" id="pm_dropshadowdistance" value="<?php echo $aOptions[ 'pm_dropshadowdistance' ]; ?>" size="15" ></input>
        </td>
        <td>
            <p><strong>DropShadowScale</strong></p>
            <p>As the shadow is blurred, it appears wider that the actual image, when not resized. Thus it's a good idea to make it slightly smaller. - 1 would be no resizing at all.</p>
            <input name="pm_dropshadowscale" id="pm_dropshadowscale" value="<?php echo $aOptions[ 'pm_dropshadowscale' ]; ?>" size="15" ></input>
        </td>
      </tr>
      <tr>
        <td>
            <p><strong>DropShadowBlurX</strong></p>
            <p>Blur of the drop shadow on the x-axis.</p>
            <input name="pm_dropshadowblurx" id="pm_dropshadowblurx" value="<?php echo $aOptions[ 'pm_dropshadowblurx' ]; ?>" size="15" ></input>
        </td>
        <td>
            <p><strong>DropShadowBlurY</strong></p>
            <p>Blur of the drop shadow on the y-axis.</p>
            <input name="pm_dropshadowblury" id="pm_dropshadowblury" value="<?php echo $aOptions[ 'pm_dropshadowblury' ]; ?>" size="15" ></input>
        </td>
      </tr>
      <tr>
        <td>
            <p><strong>MenuDistanceX</strong></p>
            <p>Distance between two menu items (from center to center).</p>
            <input name="pm_menudistancex" id="pm_menudistancex" value="<?php echo $aOptions[ 'pm_menudistancex' ]; ?>" size="15" ></input>
        </td>
        <td>
            <p><strong>MenuDistanceY</strong></p>
            <p>Distance of the menu from the bottom of the image.</p>
            <input name="pm_menudistancey" id="pm_menudistancey" value="<?php echo $aOptions[ 'pm_menudistancey' ]; ?>" size="15" ></input>
        </td>
      </tr>
      <tr>
        <td>
            <p><strong>MenuColor1</strong></p>
            <p>Color of an inactive menu item.</p>
            <input name="pm_menucolor1" id="pm_menucolor1" value="<?php echo $aOptions[ 'pm_menucolor1' ]; ?>" size="15" ></input>
        </td>
        <td>
            <p><strong>MenuColor2</strong></p>
            <p>Color of an active menu item.</p>
            <input name="pm_menucolor2" id="pm_menucolor2" value="<?php echo $aOptions[ 'pm_menucolor2' ]; ?>" size="15" ></input>
        </td>
      </tr>
      <tr>
        <td>
            <p><strong>MenuColor3</strong></p>
            <p>Color of the inner circle of an active menu item. Should equal the background color of the whole thing.</p>
            <input name="pm_menucolor3" id="pm_menucolor3" value="<?php echo $aOptions[ 'pm_menucolor3' ]; ?>" size="15" ></input>
        </td>
        <td>
            <p><strong>ControlSize</strong></p>
            <p>Size of the controls, which appear on rollover (play, stop, info, link).</p>
            <input name="pm_controlsize" id="pm_controlsize" value="<?php echo $aOptions[ 'pm_controlsize' ]; ?>" size="15" ></input>
        </td>
      </tr>
      <tr>
        <td>
            <p><strong>ControlDistance</strong></p>
            <p>Distance between the controls (from the borders).</p>
            <input name="pm_controldistance" id="pm_controldistance" value="<?php echo $aOptions[ 'pm_controldistance' ]; ?>" size="15" ></input>
        </td>
        <td>
            <p><strong>ControlColor1</strong></p>
            <p>Background color of the controls.</p>
            <input name="pm_controlcolor1" id="pm_controlcolor1" value="<?php echo $aOptions[ 'pm_controlcolor1' ]; ?>" size="15" ></input>
        </td>
      </tr>
      <tr>
        <td>
            <p><strong>ControlColor2</strong></p>
            <p>Font color of the controls.</p>
            <input name="pm_controlcolor2" id="pm_controlcolor2" value="<?php echo $aOptions[ 'pm_controlcolor2' ]; ?>" size="15" ></input>
        </td>
        <td>
            <p><strong>ControlAlpha</strong></p>
            <p>Alpha of a control, when mouse is not over.</p>
            <input name="pm_controlalpha" id="pm_controlalpha" value="<?php echo $aOptions[ 'pm_controlalpha' ]; ?>" size="15" ></input>
        </td>
      </tr>
      <tr>
        <td>
            <p><strong>ControlAlphaOver</strong></p>
            <p>Alpha of a control, when mouse is over.</p>
            <input name="pm_controlalphaover" id="pm_controlalphaover" value="<?php echo $aOptions[ 'pm_controlalphaover' ]; ?>" size="15" ></input>
        </td>
        <td>
            <p><strong>ControlsX</strong></p>
            <p>X-position of the point, which aligns the controls (measured from [0,0] of the image).</p>
            <input name="pm_controlsx" id="pm_controlsx" value="<?php echo $aOptions[ 'pm_controlsx' ]; ?>" size="15" ></input>
        </td>
      </tr>
      <tr>
        <td>
            <p><strong>ControlsY</strong></p>
            <p>Y-position of the point, which aligns the controls (measured from [0,0] of the image).</p>
            <input name="pm_controlsy" id="pm_controlsy" value="<?php echo $aOptions[ 'pm_controlsy' ]; ?>" size="15" ></input>
        </td>
        <td>
            <p><strong>ControlsAlign</strong></p>
            <p>Type of alignment from the point [controlsX, controlsY] - can be "center", "left" or "right".</p>
            <select id="pm_controlsalign" name="pm_controlsalign" size="1">
                <?php
                if( $aOptions[ 'pm_controlsalign' ] == 'left' ) {
                ?>
                <option value="left" selected="selected"> - LEFT - </option>
                <option value="center"> - CENTER - </option>
                <option value="right"> - RIGHT - </option>
                <?php
                } else if( $aOptions[ 'pm_controlsalign' ] == 'center' ) {
                ?>
                <option value="left"> - LEFT - </option>
                <option value="center" selected="selected"> - CENTER - </option>
                <option value="right"> - RIGHT - </option>
                <?php
                } else if( $aOptions[ 'pm_controlsalign' ] == 'right' ) {
                ?>
                <option value="left"> - LEFT - </option>
                <option value="center"> - CENTER - </option>
                <option value="right" selected="selected"> - RIGHT - </option>
                <?php
                } else {
                ?>
                <option value="left"> - LEFT - </option>
                <option value="center" selected="selected"> - CENTER - </option>
                <option value="right"> - RIGHT - </option>
                <?php
                }
                ?>
            </select>
        </td>
      </tr>
      <tr>
        <td>
            <p><strong>TooltipHeight</strong></p>
            <p>Height of the tooltip surface in the menu.</p>
            <input name="pm_tooltipheight" id="pm_tooltipheight" value="<?php echo $aOptions[ 'pm_tooltipheight' ]; ?>" size="15" ></input>
        </td>
        <td>
            <p><strong>TooltipColor</strong></p>
            <p>Color of the tooltip surface in the menu.</p>
            <input name="pm_tooltipcolor" id="pm_tooltipcolor" value="<?php echo $aOptions[ 'pm_tooltipcolor' ]; ?>" size="15" ></input>
        </td>
      </tr>
      <tr>
        <td>
            <p><strong>TooltipTextY</strong></p>
            <p>Y-distance of the tooltip text field from the top of the tooltip.</p>
            <input name="pm_tooltiptexty" id="pm_tooltiptexty" value="<?php echo $aOptions[ 'pm_tooltiptexty' ]; ?>" size="15" ></input>
        </td>
        <td>
            <p><strong>TooltipTextStyle</strong></p>
            <p>The style of the tooltip text, specified in the CSS file.</p>
            <input name="pm_tooltiptextstyle" id="pm_tooltiptextstyle" value="<?php echo $aOptions[ 'pm_tooltiptextstyle' ]; ?>" size="15" ></input>
        </td>
      </tr>
      <tr>
        <td>
            <p><strong>TooltipTextColor</strong></p>
            <p>Color of the tooltip text.</p>
            <input name="pm_tooltiptextcolor" id="pm_tooltiptextcolor" value="<?php echo $aOptions[ 'pm_tooltiptextcolor' ]; ?>" size="15" ></input>
        </td>
        <td>
            <p><strong>TooltipMarginLeft</strong></p>
            <p>Margin of the text to the left end of the tooltip.</p>
            <input name="pm_tooltipmarginleft" id="pm_tooltipmarginleft" value="<?php echo $aOptions[ 'pm_tooltipmarginleft' ]; ?>" size="15" ></input>
        </td>
      </tr>
      <tr>
        <td>
            <p><strong>TooltipMarginRight</strong></p>
            <p>Margin of the text to the right end of the tooltip.</p>
            <input name="pm_tooltipmarginright" id="pm_tooltipmarginright" value="<?php echo $aOptions[ 'pm_tooltipmarginright' ]; ?>" size="15" ></input>
        </td>
        <td>
            <p><strong>TooltipTextSharpness</strong></p>
            <p>Sharpness of the tooltip text (-400 to 400) - see <a href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/text/TextField.html#sharpness" target="_blank">Adobe Docs</a>.</p>
            <input name="pm_tooltiptextsharpness" id="pm_tooltiptextsharpness" value="<?php echo $aOptions[ 'pm_tooltiptextsharpness' ]; ?>" size="15" ></input>
        </td>
      </tr>
      <tr>
        <td>
            <p><strong>TooltipTextThickness</strong></p>
            <p>Thickness of the tooltip text (-400 to 400) - see <a href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/text/TextField.html#thickness" target="_blank">Adobe Docs</a>.</p>
            <input name="pm_tooltiptextthickness" id="pm_tooltiptextthickness" value="<?php echo $aOptions[ 'pm_tooltiptextthickness' ]; ?>" size="15" ></input>
        </td>
        <td>
            <p><strong>InfoWidth</strong></p>
            <p>The width of the info text field.</p>
            <input name="pm_infowidth" id="pm_infowidth" value="<?php echo $aOptions[ 'pm_infowidth' ]; ?>" size="15" ></input>
        </td>
      </tr>
      <tr>
        <td>
            <p><strong>InfoBackground</strong></p>
            <p>The background color of the info text field.</p>
            <input name="pm_infobackground" id="pm_infobackground" value="<?php echo $aOptions[ 'pm_infobackground' ]; ?>" size="15" ></input>
        </td>
        <td>
            <p><strong>InfoBackgroundAlpha</strong></p>
            <p>The alpha of the background of the info text, the image shines through, when smaller than 1.</p>
            <input name="pm_infobackgroundalpha" id="pm_infobackgroundalpha" value="<?php echo $aOptions[ 'pm_infobackgroundalpha' ]; ?>" size="15" ></input>
        </td>
      </tr>
      <tr>
        <td>
            <p><strong>InfoMargin</strong></p>
            <p>The margin of the text field in the info section to all sides.</p>
            <input name="pm_infomargin" id="pm_infomargin" value="<?php echo $aOptions[ 'pm_infomargin' ]; ?>" size="15" ></input>
        </td>
        <td>
            <p><strong>InfoSharpness</strong></p>
            <p>Sharpness of the info text (see above).</p>
            <input name="pm_infosharpness" id="pm_infosharpness" value="<?php echo $aOptions[ 'pm_infosharpness' ]; ?>" size="15" ></input>
        </td>
      </tr>
      <tr>
        <td>
            <p><strong>InfoThickness</strong></p>
            <p>Thickness of the info text (see above).</p>
            <input name="pm_infothickness" id="pm_infothickness" value="<?php echo $aOptions[ 'pm_infothickness' ]; ?>" size="15" ></input>
        </td>
        <td>
            <p><strong>Autoplay</strong></p>
            <p>Number of seconds from one transition to another, if not stopped. Set to 0 to disable autoplay.</p>
            <input name="pm_autoplay" id="pm_autoplay" value="<?php echo $aOptions[ 'pm_autoplay' ]; ?>" size="15" ></input>
        </td>
      </tr>
      <tr>
        <td colspan="2">
            <p><strong>FieldOfView</strong></p>
            <p>See the official <a href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/geom/PerspectiveProjection.html#fieldOfView" target="_blank">Adobe Docs</a>.</p>
            <input name="pm_fieldofview" id="pm_fieldofview" value="<?php echo $aOptions[ 'pm_fieldofview' ]; ?>" size="15" ></input>
        </td>
      </tr>
      
      <tr>
        <td class="right" colspan="2"><input type="submit" name="suppastore_save" value="Save Options" /></td>
      </tr>
  
</table>



    <table class="mytable" id="toggle-item-toggler6">
      <tr>
        <td>
            <h2>Home Page Layout</h2>
            <p>There are 5 different templates that can be used to define the look/design of your home page: default index page (with the sidebar), full width, normal width with sidebar (featured products in scroller) and another normal width page with featured products arranged in grid-like form. By now (and beside default index page), 4 additional custom templates already exist under Pages &gt; Pages (Dashboard) so all you need to do is to eventually modify title and Page text. If you want to use any of these extra templates select it from the drop-down list below.</p>
        </td>
      </tr>
      <tr>
        <td>
        <p><strong>Available Home Page layouts</strong></p>
        <p>Select the layout you want to use for your home page. All of the templates are supposed to display title, text and the list of featured products presented in different form (grid-like or scroller). Default index page will make the list of all products (not only featured ones) while Classic Blog layout should list all of Blog posts.</p>
        <p>Select layout [ <span class="exp">select</span> ]</p>
		<?php 
        // available layouts
        $hp_layouts = array( 'default', 'wide', 'narrow_scrolled', 'narrow_grided', 'blog', 'none' );
        $hp_layout_names = array( 'Default index page', 'Full width, featured products in grid', 'Normal width, sidebar, featured products in scroller', 'Normal width, sidebar, featured products in grid', 'Classic Blog', 'None (Widgets only!)' );
        $hp_curr_selected = $aOptions[ 'hp_layout' ];
        ?>
        <select id="hp_layout" name="hp_layout" size="1">
            <?php
            $cnt_hp = 0;
            $hp_len = count( $hp_layouts );
            while( $cnt_hp < $hp_len ) {
                if( $hp_layouts[ $cnt_hp ] == $hp_curr_selected ) echo '<option value="' . $hp_layouts[ $cnt_hp ] . '" selected="selected"> - ' . $hp_layout_names[ $cnt_hp ] . ' - </option>';
                else echo '<option value="' . $hp_layouts[ $cnt_hp ] . '"> - ' . $hp_layout_names[ $cnt_hp ] . ' - </option>';
                $cnt_hp ++;
            }
            ?>
        </select>
        </td>
      </tr>
      <tr>
        <td>
        <p><strong>Home Page layout additional options</strong></p>
        <p>You can add an extra text block with title and content/text below images slider, limit the number of products listed on home page, show/hide pagination, etc.</p>
        <p>Use an extra text block? [ <span class="exp">select yes or no</span> ]</p>
        <select id="use_extra_tb" name="use_extra_tb" size="1">
            <?php
            if( $aOptions[ 'use_extra_tb' ] == 'yes' ) {
            ?>
            <option value="yes" selected="selected"> - YES - </option>
            <option value="no"> - NO - </option>
            <?php
            } else if( $aOptions[ 'use_extra_tb' ] == 'no' ) {
            ?>
            <option value="yes"> - YES - </option>
            <option value="no" selected="selected"> - NO - </option>
            <?php
            } else {
            ?>
            <option value="yes" selected="selected"> - YES - </option>
            <option value="no"> - NO - </option>
            <?php
            }
            ?>
        </select>
        </td>
      </tr>
      <tr>
        <td>
        <p><strong>An Extra text block title</strong></p>
        <p>If you decided to use an Extra text block, set the title and write some text.</p>
        <p>Enter Extra text block title [ <span class="exp">string, no HTML!</span> ]</p>
        <input name="extra_tb_title" id="extra_tb_title" value="<?php echo $aOptions[ 'extra_tb_title' ]; ?>" size="50" ></input>
        </td>
      </tr>
      <tr>
        <td>
        <p>Enter Extra text block text [ <span class="exp">string, HTML is OK</span> ]</p>
        <textarea name="extra_tb_text" cols="60" rows="8" id="extra_tb_text"><?php echo stripslashes( $aOptions[ 'extra_tb_text' ] ); ?></textarea>
        </td>
      </tr>
      <tr>
        <td>
        <p><strong>Number of products listed on Home page</strong></p>
        <p><font style="color: red;">NOTE: Enter -1 if you want have all of the products listed!</font></p>
        <p>Display [ <span class="exp">number, integer</span> ]</p>
        <input name="hp_num_products" id="hp_num_products" value="<?php echo $aOptions[ 'hp_num_products' ]; ?>" size="5" ></input> products.
        </td>
      </tr>
      <tr>
        <td>
        <p><strong>Show or hide Home Page pagination</strong></p>
        <p>'Default index page' or 'Classic Blog' layouts may use pagination. It's up to you to decide whether to disable it or not. For a case you want to keep the pagination, feel free to set the number of products listed on home page (previous option).</p>
        <p>Show pagination on Home Page? [ <span class="exp">select yes or no</span> ]</p>
        <select id="hp_paginas" name="hp_paginas" size="1">
            <?php
            if( $aOptions[ 'hp_paginas' ] == 'yes' ) {
            ?>
            <option value="yes" selected="selected"> - YES - </option>
            <option value="no"> - NO - </option>
            <?php
            } else if( $aOptions[ 'hp_paginas' ] == 'no' ) {
            ?>
            <option value="yes"> - YES - </option>
            <option value="no" selected="selected"> - NO - </option>
            <?php
            } else {
            ?>
            <option value="yes" selected="selected"> - YES - </option>
            <option value="no"> - NO - </option>
            <?php
            }
            ?>
        </select>
        </td>
      </tr>
      <tr>
        <td>
        <p><strong>Title and text for Home Page layouts</strong></p>
        <p>Title can be hidden for all of your Home Page layouts.</p>
        <p>Show Home Page layout Title? [ <span class="exp">select yes or no</span> ]</p>
        <select id="hp_custom_show_title" name="hp_custom_show_title" size="1">
            <?php
            if( $aOptions[ 'hp_custom_show_title' ] == 'yes' ) {
            ?>
            <option value="yes" selected="selected"> - YES - </option>
            <option value="no"> - NO - </option>
            <?php
            } else if( $aOptions[ 'hp_custom_show_title' ] == 'no' ) {
            ?>
            <option value="yes"> - YES - </option>
            <option value="no" selected="selected"> - NO - </option>
            <?php
            } else {
            ?>
            <option value="yes" selected="selected"> - YES - </option>
            <option value="no"> - NO - </option>
            <?php
            }
            ?>
        </select>
        <p>All other Home Page layouts but 'Default index page' may show content/text too. You can disable/hide text appearance if you like.</p>
        <p>Show custom layout Content/Text? [ <span class="exp">select yes or no</span> ]</p>
        <select id="hp_custom_show_content" name="hp_custom_show_content" size="1">
            <?php
            if( $aOptions[ 'hp_custom_show_content' ] == 'yes' ) {
            ?>
            <option value="yes" selected="selected"> - YES - </option>
            <option value="no"> - NO - </option>
            <?php
            } else if( $aOptions[ 'hp_custom_show_content' ] == 'no' ) {
            ?>
            <option value="yes"> - YES - </option>
            <option value="no" selected="selected"> - NO - </option>
            <?php
            } else {
            ?>
            <option value="yes" selected="selected"> - YES - </option>
            <option value="no"> - NO - </option>
            <?php
            }
            ?>
        </select>
        </td>
      </tr>
      <tr>
        <td class="right"><input type="submit" name="suppastore_save" value="Save Options" /></td>
      </tr>
    </table>




            
<table class="mytable" id="toggle-item-toggler7">
  <tr>
    <td>
        <h2>Stock Inventory</h2>
        <p>You can easily enable or disable Stock Inventory management from here. If you deal with products that are always available in stock, there's no need for maintenance and no need to use this feature.</p>
    </td>
  </tr>
  <tr>
    <td>
    <p><strong>Do you want to use Stock Inventory Management feature?</strong></p>
    <p>Use Stock Inventory Management? [ <span class="exp">Yes or No</span> ]</p>
        <select id="use_stock" name="use_stock" size="1">
        	<?php
			if( $aOptions[ 'use_stock' ] == 'yes' ) {
			?>
        	<option value="yes" selected="selected"> - YES - </option>
            <option value="no"> - NO - </option>
            <?php
			} else if( $aOptions[ 'use_stock' ] == 'no' ) {
			?>
        	<option value="yes"> - YES - </option>
            <option value="no" selected="selected"> - NO - </option>
            <?php
			} else {
			?>
        	<option value="yes" selected="selected"> - YES - </option>
            <option value="no"> - NO - </option>
			<?php
			}
			?>
        </select>
    </td>
  </tr>
  <tr>
    <td>
    <p><strong>Notify Admin if stock low</strong></p>
    <p>Admin can receive "Inventory Low" notifications by email in case certain product gets out of stock. An email address you've provided by WordPress installation will be used to receive notifications.</p>
    <p>Send "Inventory Low" notifications? [ <span class="exp">Yes or No</span> ]</p>
        <select id="stock_notify_on_low" name="stock_notify_on_low" size="1">
        	<?php
			if( $aOptions[ 'stock_notify_on_low' ] == 'yes' ) {
			?>
        	<option value="yes" selected="selected"> - YES - </option>
            <option value="no"> - NO - </option>
            <?php
			} else if( $aOptions[ 'stock_notify_on_low' ] == 'no' ) {
			?>
        	<option value="yes"> - YES - </option>
            <option value="no" selected="selected"> - NO - </option>
            <?php
			} else {
			?>
        	<option value="yes" selected="selected"> - YES - </option>
            <option value="no"> - NO - </option>
			<?php
			}
			?>
        </select>
    </td>
  </tr>
  <tr>
    <td>
    <p><strong>Send Stock notifications to the following e-mail address</strong></p>
    <p>By default notification is sent to alpha-admin email address. You may override this setting if you enter another email address which will be used for that purpose.</p>
    <p>Enter alternative email address [ <span class="exp">string, no HTML!</span> ]</p>
    <input name="stock_notify_email" id="stock_notify_email" value="<?php echo $aOptions[ 'stock_notify_email' ]; ?>" size="50" ></input>
    </td>
  </tr>
  <tr>
    <td class="right"><input type="submit" name="suppastore_save" value="Save Options" /></td>
  </tr>
</table>
<table class="mytable" id="toggle-item-toggler8">
  <tr>
    <td>
        <h2>General Options/Settings</h2>
        <p>Decide whether you need it or not, it's optional...</p>
    </td>
  </tr>
  <tr>
    <td>
    <p><strong>Google fonts</strong></p>
    <p>Google does offer free of charge usage of non-standard web fonts (see <a href="http://www.google.com/webfonts" target="_blank">Google WEB Fonts</a>). Select the one that fits best to your webshop. Please note that some of them do not contain non-english characters!</p>
    <p>Select font-face [ <span class="exp">select</span> ]</p>
    <?php 
    // available layouts
    $gf_layouts = array( 'Yanone+Kaffeesatz:light,regular,bold', 'Didact+Gothic', 'Play:regular,bold', 'News+Cycle', 'Oswald', 'Lekton:regular,italic,bold', 'Cuprum', 'Droid+Sans:regular,bold', 'Crushed', 'Philosopher', 'Rokkitt', 'Terminal+Dosis+Light', 'Swanky+and+Moo+Moo', 'Bigshot+One', 'Waiting+for+the+Sunrise', 'Maiden+Orange', 'Geo', 'Maven+Pro:regular,500&v1', 'Redressed' );
    $gf_layout_names = array( 'Yanone Kaffeesatz', 'Didact Gothic', 'Play', 'News Cycle', 'Oswald', 'Lekton', 'Cuprum', 'Droid Sans', 'Crushed', 'Philosopher', 'Rokkitt', 'Terminal Dosis Light', 'Swanky and Moo Moo', 'Bigshot One', 'Waiting for the Sunrise', 'Maiden Orange', 'Geo', 'Maven Pro', 'Redressed' );
    $gf_curr_selected = $aOptions[ 'google_fonts' ];
    ?>
    <select id="google_fonts" name="google_fonts" size="1">
        <?php
        $cnt_gf = 0;
        $gf_len = count( $gf_layouts );
        while( $cnt_gf < $gf_len ) {
            if( $gf_layouts[ $cnt_gf ] == $gf_curr_selected ) echo '<option value="' . $gf_layouts[ $cnt_gf ] . '" selected="selected"> - ' . $gf_layout_names[ $cnt_gf ] . ' - </option>';
            else echo '<option value="' . $gf_layouts[ $cnt_gf ] . '"> - ' . $gf_layout_names[ $cnt_gf ] . ' - </option>';
            $cnt_gf ++;
        }
        ?>
    </select>
    </td>
  </tr>
  <tr>
    <td>
    <p><strong>Breadcrumbs</strong></p>
    <p>Do you want to enable breadcrumbs navigation? It might be very helpful with complex sitemaps.</p>
    <p>Use Breadcrumbs or not? [ <span class="exp">Yes or No</span> ]</p>
        <select id="usebread" name="usebread" size="1">
        	<?php
			if( $aOptions[ 'usebread' ] == 'yes' ) {
			?>
        	<option value="yes" selected="selected"> - YES - </option>
            <option value="no"> - NO - </option>
            <?php
			} else if( $aOptions[ 'usebread' ] == 'no' ) {
			?>
        	<option value="yes"> - YES - </option>
            <option value="no" selected="selected"> - NO - </option>
            <?php
			} else {
			?>
        	<option value="yes" selected="selected"> - YES - </option>
            <option value="no"> - NO - </option>
			<?php
			}
			?>
        </select>
    </td>
  </tr>
  <tr>
    <td>
    <p><strong>Contact form</strong></p>
    <p>By default contact form results are sent to alpha-admin email address. You may override this setting if you enter another email address which will be used for that purpose.</p>
    <p>Enter alternative email address [ <span class="exp">string, no HTML!</span> ]</p>
    <input name="send_form" id="send_form" value="<?php echo $aOptions[ 'send_form' ]; ?>" size="50" ></input>
    </td>
  </tr>
  <tr>
    <td>
    <p><strong>Disable comments on Posts?</strong></p>
    <p>You can disable user comments on Posts if you like. That's how you don't need to disable it for each Post individually.</p>
    <p>Disable comments? [ <span class="exp">Yes or No</span> ]</p>
        <select id="disable_comments" name="disable_comments" size="1">
        	<?php
			if( $aOptions[ 'disable_comments' ] == 'yes' ) {
			?>
        	<option value="yes" selected="selected"> - YES - </option>
            <option value="no"> - NO - </option>
            <?php
			} else if( $aOptions[ 'disable_comments' ] == 'no' ) {
			?>
        	<option value="yes"> - YES - </option>
            <option value="no" selected="selected"> - NO - </option>
            <?php
			} else {
			?>
        	<option value="yes" selected="selected"> - YES - </option>
            <option value="no"> - NO - </option>
			<?php
			}
			?>
        </select>
    </td>
  </tr>
  <tr>
    <td>
    <p><strong>Trim Post text summary to N number of words</strong></p>
    <p>This option relates to a common Post. Index page and some other templates (like search, archive, tag, etc.) are used to make the list of Posts (+ pagination for more pages). In order to kinda un-clutter these templates and show only text intro (summary) Post content may be trimmed to N number of words.</p>
    <p>Trim to [ <span class="exp">number, integer (for example: 45)</span> ]</p>
    <input name="trim_summary" id="trim_summary" value="<?php echo $aOptions[ 'trim_summary' ]; ?>" size="5" ></input> words.
    </td>
  </tr>
  <tr>
    <td>
    <p><strong>Colorbox Width and Heights</strong></p>
    <p>Beside large image view, Colorbox jQuery plugin is used to handle basket items (modify, delete), error messages, Stock Inventory, etc. The following dimensions setting will be applied to all but image view that is resized automatically - according to an actual image size. There's one width required for all, no need for multiple. However, some messages inside colorbox window are short and thus don't fill entire height.<br /><br />
The point is, Colorbox plugin allows you to set different skins which affect content width and height indirectly (content scroller may appear!). In order to get rid of vertical and horizontal scroller you can fine tune dimensions here. Default settings relate to skin #3.</p>
    <p>Colorbox Width [ <span class="exp">number, integer (default: 720)</span> ]</p>
    <input name="cb_width" id="cb_width" value="<?php echo $aOptions[ 'cb_width' ]; ?>" size="5" ></input> px
    </td>
  </tr>
  <tr>
      <td>
    <p>Colorbox min Height [ <span class="exp">number, integer (default: 320)</span> ]</p>
    <input name="cb_height_small" id="cb_height_small" value="<?php echo $aOptions[ 'cb_height_small' ]; ?>" size="5" ></input> px
    </td>
  </tr>
  <tr>
      <td>
    <p>Colorbox max Height [ <span class="exp">number, integer (default: 480)</span> ]</p>
    <input name="cb_height" id="cb_height" value="<?php echo $aOptions[ 'cb_height' ]; ?>" size="5" ></input> px
    </td>
  </tr>
  <tr>
    <td>
    <p><strong>Social Profiles in page footer</strong></p>
    <p>Edit HTML to match your accounts. Feel free to remove all if you like.</p>
    <p>Social links [ <span class="exp">text, HTML is OK</span> ]</p>
    <textarea name="social_set" cols="60" rows="5" id="social_set"><?php echo stripslashes( $aOptions[ 'social_set' ] ); ?></textarea>
    </td>
  </tr>
  <tr>
    <td>
    <p><strong>Website Copyright info in footer</strong></p>
    <p>Here you can easily add copright info. HTML formatted text is allowed to be entered too.</p>
    <p>&copy; Copyright info [ <span class="exp">text, HTML is OK</span> ]</p>
    <textarea name="copytext" cols="60" rows="5" id="copytext"><?php echo stripslashes( $aOptions[ 'copytext' ] ); ?></textarea>
    </td>
  </tr>
  <tr>
    <td class="right"><input type="submit" name="suppastore_save" value="Save Options" /></td>
  </tr>
</table>

    </form>
</div>

<?php
	}
}
// Register class
add_action( 'admin_menu', array( 'SofaSuppaStore', 'addOptions' ) );

/* LOADING ORDER DOES MATTER !*/
/* Widget-ready sections */
require_once( TEMPLATEPATH . '/administration/sidebars_footers.php' );
/* Theme Custom Functions */
require_once( TEMPLATEPATH . '/administration/helper_functions.php' );
/* Dimox breadcrumbs */
require_once( TEMPLATEPATH . '/administration/breadcrumbs.php' );
/* Theme Widgets */
require_once( TEMPLATEPATH . '/administration/theme_widgets.php' );
/* Handle Taxonomies and Custom Post Types */
require_once( TEMPLATEPATH . '/administration/meta-boxes-file.php' );
require_once( TEMPLATEPATH . '/administration/custom_post_definitions.php' );
/* Theme Shortcodes */
require_once( TEMPLATEPATH . '/administration/theme_shortcodes.php' );